PATHMac OS 8 and 9 Developer Documentation > Networking and Communications > URL Access Manager >

Transferring Files With the URL Access Manager


System Event Callback Routine

If your application calls URLSimpleDownload , URLSimpleUpload , URLDownload , or URLUpload , you may want to provide a routine that receives system events that may occur while the URL Access Manager displays a dialog box with a progress indicator or an authentication dialog box. A typical system event callback routine might look like this:

void MyURLSystemEventCBProc(
                     void* userContext,
                     EventRecord *event);
userContext
An untyped pointer to arbitrary data that your application previously passed to URLSimpleDownload or URLSimpleUpload .
event
A pointer to a structure of type eventRecord that describes the event that triggered the callback. For more information on the EventRecord structure see Inside Macintosh: Overview .
result
Your system event callback routine should process the system event and return noErr .

DISCUSSION

If your application asks the URL Access Manager to display a progress indicator or an authentication dialog box during a call to URLSimpleDownload , URLSimpleUpload , URLDownload , or URLUpload , your application should provide a system event callback routine to handle events that occur while the progress indicator or authentication dialog box is being displayed.

If your application does not provide a system event callback routine, the URL Access Manager uses a non-movable modal dialog box to display the progress indicator or authentication dialog box.

When your system event callback routine is called, it should process the event immediately.

WARNING

Do not call URLDisposeReference from your system event callback routine. Doing so may cause your application to stop working.


© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)